var status = -1;
var selectionLog = [];

function start() {
    action(1, 0, 0)
}

function action(e, c, b) {
    if (status == 0 && e == 0) {
        cm.dispose();
        return
    }(e == 1) ? status++ : status--;
    selectionLog[status] = b;
    var d = cm.getMapId();
    var a = -1;
    if (status <= a++) {
        cm.dispose()
    } else {
        if (status === a++) {
            if (d == 867200110) {
                cm.openUI(1887);
                cm.dispose()
            } else {
                cm.askMenu("要返回大本营吗？#b\r\n#L0#返回大本营。#l\r\n#L1#与村民们在一起。#l", 4, 9400570)
            }
        } else {
            if (status === a++) {
                if (b == 0) {
                    cm.setQuestCustomData(867200400, cm.getMapId());
                    cm.sendNormalTalk("记住当前位置。", 4, 9400570, false, true)
                } else {
                    cm.dispose()
                }
            } else {
                cm.dispose();
                cm.warp(867200110, 0)
            }
        }
    }
};